package com.unitd.base.module.api.service;

import com.unitd.base.module.api.mybatis.mapper.ApiCommentPictureMapper;
import com.unitd.base.module.api.entity.CommentPictureVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ApiCommentPictureService {
    @Autowired
    private ApiCommentPictureMapper commentPictureDao;


    public CommentPictureVo queryObject(Integer id) {
        return commentPictureDao.selectById(id);
    }


    public List<CommentPictureVo> queryList(Map<String, Object> map) {
        return commentPictureDao.selectByMap(map);
    }


    public int queryTotal(Map<String, Object> map) {
        return commentPictureDao.queryTotal(map);
    }

    public int save(CommentPictureVo comment) {
        return commentPictureDao.insert(comment);
    }


    public void update(CommentPictureVo comment) {
        commentPictureDao.updateById(comment);
    }


    public void delete(Integer id) {
        commentPictureDao.deleteById(id);
    }
}
